///////////////////////////////////////////////////////////
///////////////// Have an itch? Scratch it! ///////////////
///////////////////////// SCRATCH /////////////////////////
/////////////////////  A MUD  Server   ////////////////////
///////////////////// By: Jared Devall ////////////////////
/////////////////////      Thanks:     ////////////////////
/////////////////////  DIKU/Merc/ROM   ////////////////////
///////////////////// Aetas/Deus Gang  ////////////////////
/////////////////////       Beej       ////////////////////
///////////////////////////////////////////////////////////

#ifndef __H_TIMESTAMP
#define __H_TIMESTAMP

#include <time.h>
#include <string>


class Timestamp {
	public:
		// Constructors...
		Timestamp();

		// Methods for formatting time strings...
		std::string	getTime( void );
		std::string	getDateTime( void );
		std::string	backupTime();
		// Methods for randomization...
		unsigned	random( const unsigned& a );
		unsigned	random( const unsigned& a, const unsigned& b );
		bool		chance( const unsigned& a );

		// Statics...
		static Timestamp &Instance();
};

// Our singleton instance
inline Timestamp &Timestamp::Instance() {
	static Timestamp _instance;
	return _instance;
}

#endif // #ifndef __H_TIMESTAMP
